package com.zz.tijian.handle.ratelimiter.res;

import com.alibaba.fastjson.JSON;

import java.lang.reflect.Method;

public class DefaultRateLimiterResponseStrategy implements RateLimiterResponseStrategy {
    @Override
    public Object getResponse(Method method) {
        RateLimiterResponse response = new RateLimiterResponse("400", "调用方法超过最大次数，限流返回！");
        return JSON.parseObject(JSON.toJSONString(response), method.getReturnType());
    }
}
